function genResultPath(o, net, bFound, Train, Test)
global bForceUpdate

if isempty(bForceUpdate), bForceUpdate = false; end

%%
state = 'FOUND';
if bForceUpdate || ~isdir(o.result_path) || ~exist(o.file, 'file')
    if bFound && bForceUpdate
        state = 'UPDATED';
    else
        state = 'CREATED';
        mkdir(o.result_path);
    end
    
    %% create train.txt and test.txt
    [Train, Test] = o.genTrainTestFile(Train, Test);
    
    %% create net file
    net.content = o.setName(strtrim(net.content), net.name);
    net.content = o.setTrainTest(net.content, Train, Test);
    o.genFile(o.file, net.content);
    
    %% create deploy file
    mycaffe.net.createDeployNet(o.file, o.deploy_file);
end
if ~isdir(o.log_path), mkdir(o.log_path); end
if ~isdir(o.model_path), mkdir(o.model_path); end

fprintf('Net training result path is %s:\n    %s\n', state, o.result_path);
